/**
 * @author Nicolas Lusa (lusan@usi.ch)
 */
package ch.usi.inf.pf2.gui.tool;

import java.awt.event.MouseEvent;

import ch.usi.inf.pf2.circuit.Output;
import ch.usi.inf.pf2.gui.Model;

public final class OutputCreationTool extends Tool {

    public OutputCreationTool(final Model model) {
        super(model, "Select this tool and click on the canvas to create an output.", "../icons/output.png", "../icons/outputBg.png");
    }
    
    public void mouseClicked(final MouseEvent ev) {
        final Output out = new Output(ev.getX(), ev.getY());
        getCircuit().add(out);
        getSelection().clear();
        getSelection().add(out);
    }

}